<template>
  <div v-if="tableList.length > 0" class="container">
    <el-row :gutter="20" style="margin-top: 60px">
      <el-col :span="12">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>打卡地区分布</span>
          </div>
          <div class="text item">
            <numberOfUser :tableList='tableList' />
          </div>
        </el-card>
      </el-col>
      <el-col :span="12">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>近半年反馈情况</span>
          </div>
          <div class="text item">
            <userData :tableList='tableList' />
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import userData from './userData.vue'
import numberOfUser from './numberOfUser.vue'
import { getFeedback } from '@/api/feedback'
export default {
  name: '',
  components: {
    userData,
    numberOfUser
  },
  props: {},
  data () {
    return {
      tableList: []
    }
  },
  computed: {},
  watch: {},
  created () {},
  mounted () {
    this.getAllInfo()
  },
  methods: {
    async getAllInfo () {
      const res = await getFeedback()
      console.log('res', res)
      this.tableList = res.data.data
    }
  }
}
</script>

<style scoped lang="">
</style>
